package com.ponhu.ea2.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@Accessors(chain = true)
@ApiModel("货品编码生成入参")
public class InventoryCodeGenerateDto implements Serializable {

    @NotEmpty(message = "入库方式不可为空")
    @ApiModelProperty(value = "入库方式", required = true)
    private String type;

    @Min(value = 1)
    @NotNull(message = "生成编码数量不可为空")
    @ApiModelProperty(value = "生成编码数量", required = true)
    private Integer size;

    @NotEmpty(message = "调用方标识不可为空")
    @ApiModelProperty(value = "调用方标识", required = true)
    private String systemEnum;

    @Min(value = 1, message = "是否是二奢：1是，2否")
    @Max(value = 2, message = "是否是二奢：1是，2否")
    @NotNull(message = "是否是二奢不可为空")
    @ApiModelProperty(value = "是否是二奢：1是，2否")
    private Integer isSecondhand;

}
